package com.dx.result;

import lombok.Data;

import java.util.List;

@Data
public class PageResult<T> {
    private Long total;
    private List<T> records;
//    List<T> entity=new ArrayList<>();

    public static <T> PageResult<T> page(Long total,List<T> records){
        PageResult<T> pageResult = new PageResult<>();
        pageResult.setTotal(total);
        pageResult.setRecords(records);
        return pageResult;
    }
}
